import { Component, OnInit ,ElementRef,ViewChild} from '@angular/core';

@Component({
  selector: 'el-button-group',
  templateUrl: './el-button-group.component.html',
  styleUrls: ['./el-button-group.component.css','./button.css']
})
export class ElButtonGroupComponent implements OnInit {

  constructor() { }

  @ViewChild('self') self:ElementRef

  ngOnInit() {
      
  }

  ngAfterViewInit(){
      let btnList=this.self.nativeElement.querySelectorAll('.el-button');
      // console.log(btnList)
      btnList[0].style.borderTopLeftRadius='5px';
      btnList[0].style.borderBottomLeftRadius='5px';

      btnList[btnList.length-1].style.borderTopRightRadius='5px';
      btnList[btnList.length-1].style.borderBottomRightRadius='5px';
  }

}
